#include"MyTask.h"
MyTask::MyTask(TaskQenen &task)
:_task(task){}
MyTask::~MyTask(){
    cout<<"~MyTask()"<<endl;
}
 void MyTask::process(){
    int cnt = 5;
    while(cnt-- > 0)
    {
        //其实就是为了从TaskQueue中取出任务
        int number = _task.pop();
        cout << ">>Consumer consume " << number << endl;
        //消费速度快一点
        sleep(1);
    }
}